home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 3459 < prev    next >
Encoding:
Text File  |  1996-08-06  |  1.2 KB  |  47 lines

  1. Path: tst.hk.super.net!usenet
  2. From: Judy Wong <jlcwong@hk.super.net>
  3. Newsgroups: comp.lang.c++
  4. Subject: Abend caused by "strcmp"
  5. Date: 24 Jan 1996 05:43:40 GMT
  6. Organization: Hong Kong SuperNET
  7. Message-ID: <4e4guc$o1u@tst.hk.super.net>
  8. NNTP-Posting-Host: annex5-32.hk.super.net
  9. Mime-Version: 1.0
  10. Content-Type: text/plain; charset=us-ascii
  11. Content-Transfer-Encoding: 7bit
  12. X-Mailer: Mozilla 1.1N (Windows; I; 16bit)
  13.  
  14.  
  15. I am using Borland C++ v4.0 & v4.5.  My machine is Intel Pentium 100.  
  16. The program I wrote is a window program.
  17.  
  18. In v4.5, when my program executes the statement :
  19.  
  20.    "if (strcmp(a, NULL) == 0) ..." where a is declared as
  21.                                          char *a="name";
  22.  
  23. it abends with the following 'Unhandled Exception' error msg. :
  24.  
  25.                General Protection Exception
  26.          BC450RTL(1) 0x41A7:0x61c9 Processor Fault
  27.  
  28. I used v4.0 & test the program once again.  The above msg. appeared 
  29. again.  If the statement is changed into :
  30.  
  31.                  "if (strcmp(a, "") == 0) ..."
  32.  
  33. the program runs smoothly in either v4.0 & v4.5
  34.  
  35. In those days before my upgrade to Pentium, I used Intel 386 & v4.0.
  36. using "strcmp" comparing with NULL was OK.
  37.  
  38. Is this hardware problem ? Or any other reasons ?
  39.  
  40. Thanks you for you help.
  41.  
  42. Regards,
  43. Samson
  44.  
  45.  
  46.  
  47.